package com.chenpeijian.demo.service;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.chenpeijian.demo.service.stream.TenantDO;
import com.chenpeijian.demo.service.stream.TenantInfoHandler;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @program: student_code
 * @description:
 * @author: 陈培建
 * @create: 2024-11-20 14:14
 **/
public class Test {
    public static void main(String[] args) {
        BigDecimal current = new BigDecimal(1);
        BigDecimal total = new BigDecimal(12);
        BigDecimal result = current.divide(total,2, RoundingMode.HALF_UP);
        int process = (int) result.doubleValue();
        System.out.println(process * 100);

    }
    public void handleTenantInfo(TenantInfoHandler handler) {

        // 获得租户
        TenantDO tenant = new TenantDO();
        tenant.setId(66L);
        // 执行处理器
        handler.handle(tenant);
    }
}
